package com.example.zhaojianxu.signin.bank.analysis

import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.ViewGroup
import com.example.zhaojianxu.signin.R
import com.example.zhaojianxu.signin.bank.http.AnalysisEntity

/**
 * create by @zhaojianxu on 2019/2/17
 */
class AnalysisAdapter(var mList: MutableList<AnalysisEntity>): RecyclerView.Adapter<AnalysisViewHolder>(){

    override fun onCreateViewHolder(p0: ViewGroup, p1: Int): AnalysisViewHolder {
        return AnalysisViewHolder(LayoutInflater.from(p0.context).inflate(R.layout.bank_item_analysis,p0,false))
    }

    override fun getItemCount(): Int {
        return mList.size
    }

    override fun onBindViewHolder(p0: AnalysisViewHolder, p1: Int) {
        p0.bindData(mList[p1])
    }

}